package cn.iocoder.yudao.module.system.dal.mysql.tenantrechargelist;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.tenantrechargelist.TenantRechargeListDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.tenantrechargelist.vo.*;

/**
 * 租户代充记录 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface TenantRechargeListMapper extends BaseMapperX<TenantRechargeListDO> {

    default PageResult<TenantRechargeListDO> selectPage(TenantRechargeListPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TenantRechargeListDO>()
                .eqIfPresent(TenantRechargeListDO::getRechargeAmount, reqVO.getRechargeAmount())
                .eqIfPresent(TenantRechargeListDO::getRechargeType, reqVO.getRechargeType())
                .eqIfPresent(TenantRechargeListDO::getRechargeNum, reqVO.getRechargeNum())
                .eqIfPresent(TenantRechargeListDO::getAttachment, reqVO.getAttachment())
                .eqIfPresent(TenantRechargeListDO::getRemark, reqVO.getRemark())
                .eqIfPresent(TenantRechargeListDO::getTargetTenantId, reqVO.getTargetTenantId())
                .eqIfPresent(TenantRechargeListDO::getHandleStatus, reqVO.getHandleStatus())
                .eqIfPresent(TenantRechargeListDO::getOperator, reqVO.getOperator())
                .betweenIfPresent(TenantRechargeListDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(TenantRechargeListDO::getId));
    }

}